load("//tools/skylark:py.bzl", "py_library")
load("//tools/lint:lint.bzl", "add_lint_tests")
load("//tools/install:install.bzl", "install")

py_library(
    name = "module_py",
    srcs = ["__init__.py"],
    imports = [".."],
)

py_library(
    name = "_drake_visualizer_builtin_scripts",
    srcs = [
        "experimental_show_deformable_mesh.py",
        "grid_wireframe.py",
        "limit_clipping_range.py",
        "show_frame.py",
        "show_hydroelastic_contact.py",
        "show_image.py",
        "show_point_cloud.py",
        "show_point_pair_contact.py",
        "show_time.py",
        "use_builtin_scripts.py",
    ],
    visibility = [
        "//tools/workspace/drake_visualizer:__pkg__",
    ],
    deps = [
        ":module_py",
    ],
)

install(
    name = "install",
    tags = [
        # In the case when drake-visualizer is disabled, this target will not
        # participate in the install target.  Nerf the linter warning for that.
        "no_install_lint",
    ],
    targets = [
        ":_drake_visualizer_builtin_scripts",
        ":module_py",
    ],
    py_dest = "@PYTHON_SITE_PACKAGES@/_drake_visualizer_builtin_scripts",  # noqa
    visibility = ["//tools/workspace/drake_visualizer:__pkg__"],
)

add_lint_tests()
